#ifndef THREAD_HPP
#define THREAD_HPP

#ifdef MY_USE_WIN32

    #include "Concurrent/Win32/ThreadImp.hpp"

    namespace My { typedef DWORD ThreadId; }

#elif MY_USE_UNIX

    #include "Concurrent/Unix/ThreadImp.hpp"
    #include "sys/types.h"

    namespace My { typedef pid_t ThreadId; }

#else

    #error No implementation defined for My::ThreadImp.

#endif

namespace My
{
    class Thread : private ThreadImp
    {
    public:
        Thread();
        virtual ~Thread();

        static ThreadId GetCurrentThreadId();
    };

    inline Thread::Thread()
    {}

    inline Thread::~Thread()
    {}

    inline ThreadId Thread::GetCurrentThreadId()
    {
        return ThreadImp::GetCurrentThreadId();
    }
}

#endif // THREAD_HPP
